package edu.map.aamas.charts;

import edu.map.aamas.gui.Tadpole;
import edu.map.aamas.rnn.RNN;

public class MeanSpeedChart extends RnnChart {

	private static final long serialVersionUID = 1L;
	
	double travelDistance = 0.0;

	public MeanSpeedChart(RNN rnr) {
		super(rnr, new String[]{"mean speed"});
	}
	
	public void rnnUpdated(RNN rnr) {
		travelDistance += Tadpole.getInstance().instantSpeed;
		update(new double[]{travelDistance/(double)rnr.iteration});
	}
}
